# Overview

This folder contains all of the data and code necessary to replicate the results from Appendix 9 of "Longer Trips to Court Cause Evictions" by David A. Hoffman and Anton Strezhnev. The primary dataset consists of eviction filings in Harris County Justice of the Peace courts from 2000 to 2018. The specific names of the plaintiffs and defendants as well as the precise addresses have been removed.

# Description of the files in the archive

`houston_data_analysis.R` - Primary R script

`stat_binscatter.R` - Auxiliary script for generating binned scatterplots with quantile bins. Originally written by Maximilian Eber. Original source: https://github.com/maximilianeber/binscatter 

## Data

`harris_data_merged.csv` - Primary data file. Contains 935,221 eviction proceedings in Harris County from 2000 to 2018 (obtained from EvictionLab) merged with data on the assigned Justice of the Peace Court, Google Maps geolocation data, and Google Maps DistanceMatrix API estimates of the commuting time from the plaintiff's property to the JP court. Complete description of all variable names below.

`court_list_updated.csv` - Dataset of the addresses of all Justice of the Peace Courts in Harris County (also merged into `harris_data_merged.csv`). Two JP courts (in precinct 1) relocated during the period 2000-2018, so this dataset contains 18 total records.

`Houston Tracts` - Folder containing the shapefiles for the 2010 Census Tracts.

`Houston Blocks` - Folder containing the shapefiles for the 2010 Census Blocks

`Houston Precincts` - Folder containing the shapefiles for the Harris County Justice of the Peace Precinct boundaries.

`ACS/Block/2010_houston_block_race.csv` - U.S. Census (2010) block-level racial demographic data (from table ID: DECENNIALPL2010.P1)

`ACS/Block/2010_houston_block_hispanic.csv` - U.S. Census (2010) block-level data on hispanic/latino  (from table ID: DECENNIALPL2010.P2)

`ACS/Tract/acs_houston_income.csv` - 2011-2015 American Community Survey 5-Year Estimates for Income in the past 12 months (Table ID: ACSST5Y2015.S1901)

`ACS/Tract/acs_houston_housing.csv` - 2011-2015 American Community Survey 5-Year Estimates for housing characteristics (Table ID: ACSDP5Y2015.DP04)

`ACS/Tract/acs_houston_race.csv` - 2011-2015 American Community Survey 5-Year Estimates for demographic data (Table ID: ACSDP5Y2015.DP05)

`ACS/Tract/acs_houston_contractRent.csv` - 2011-2015 American Community Survey 5-Year Estimates for median contract rent (Table ID: ACSDT5Y2015.B25058)

# Description of variables in `harris_data_merged.csv`

935,221 observations. 42 variables

- `xfilemonth`, `xfileday`, `xfileyear`, `xfiledate`, `casefiledate`: Date case filed
- `xdispmonth`, `xdispday`, `xdispyear`, `xdispdate`, `dispositiondate`: Date case disposed
- `casetype`: Type of case (all fields CV = 'civil')
- `casesubtype`: Subtype of case (all fields EVICTION)
- `publichousing`: Indicator for whether the case involves a public housing property
- `claimamount`: Amount claimed by plaintiff.
- `dispositiondesc`: Description of the case disposition (based on classifications from the Texas Office of Court Administration (OCA))
- `judgmentamount`: Amount of judgment
- `attorneyfees`: Attorney fees awarded
- `courtcosts`: Court costs awarded
- `prejudgintrate`: Pre-judgment interest rate awarded 
- `postjudgintrate`: Post-judgment interest rate awarded
- `xstate`: State of address (all fields = TX)
- `xoutcome`: Winning party of the dispute (or dismissed)
- `court_number`: Courthouse where case was filed (numeric ID)
- `Courthouse`: Precinct and number of courthouse
- `Courthouse Address`, `Courthouse Address Number`, `Courthouse Address Street`, `Courthouse Address City`, `Courthouse Address Zip`: Address (and address components) of courthouse
- `Courthouse Latitude`: Latitude of courthouse (from Google Geolocation API)
- `Courthouse Longitude`: Longitude of courthouse (from Google Geolocation API)
- `google_latitude`: Latitude of property (from Google Geolocation API)
- `google_longitude`: Longitude of property (from Google Geolocation API)
- `status`: Status of the Google Geolocation API query
- `driving_distance`: Driving distance from property to courthouse returned by DistanceMatrix API (in meters)
- `driving_distance_text`: Driving distance from property to courthouse (in text)
- `driving_duration`: Driving duration from property to courthouse returned by DistanceMatrix API (in seconds)
- `driving_duration_text`: Driving duration from property to courthouse (in text)
- `search_status`: Status of the Google DistanceMatrix API query
- `xcasenum`: Unique identifier for each case (randomly generated via `uuid::UUIDgenerate()`)
- `Match_addr`: Unique identifier for each property address (randomly generated via `uuid::UUIDgenerate()`)


